var config=require("./config/");
var mongoose=require("mongoose");
mongoose.connect(config.mongodb,{useNewUrlParser:true});
var db=mongoose.connection;
db.on('error',function () {
    return console.log("连接数据库失败");
});
db.on('open',function () {
    console.log('连接数据库成功');
});